using namespace std;
#include <iostream>
#include <boost/xpressive/xpressive.hpp>
#include <iostream>
#include <string>
#include <fstream>
#include <boost/regex.hpp>

int main(){

	string line, str3;
	ifstream myfile;
double  *utilityMatrix; // hol

	vector< string > result;
int noofplayers=0;
int* noofactions=0;
int numberofStrategyProfiles = 1;

	//myfile.open("/home/rohithdv/rohith/COURSE_WORK_JAN2010/GAME_THEORY_Y_NARAHARI/gametheory_assignments/ASSIGNMENT_1/eclipseprojects2/Assignment1_PureStrategyNE/input/zero-sum-game_GAMBIT_FORMAT"); // opens the file
	cout << "here" << endl;
	myfile.open("/home_fedora/GameTheory_Assignment_PSNE/Assignment1_PureStrategyNE/input/zero-sum-game_GAMBIT_FORMAT"); // opens the file
	cout << "here" << endl;

	if(!myfile) { // file couldn't be opened
		cerr << "Error: file could not be opened" << endl;
		exit(1);
	}

	
	if (myfile.is_open())
	{
		int nooflinesEncountered = 0;
		int blankLineEncountered  = 0;
		while (! myfile.eof() )
		{

			getline (myfile,line);
			std::string line1(line);
			std::string hello( "hello world!" );
			cout << line1 << endl;
			
			boost::xpressive::smatch what;
			boost::cmatch what1;
			boost::xpressive::sregex expression11 = boost::xpressive::sregex::compile( "(Players:).*" );

			boost::regex expression3("(actions:).*");
			

			if (line.empty())
			{
				// cout << "Blank line" << endl;
				blankLineEncountered = 1; // after this line the values in the file represent the utility values of the players
			}
			else if(boost::xpressive::regex_match(hello, what, expression11))
			{
				// Players:
			}


		}
		if (nooflinesEncountered < 2 || blankLineEncountered == 0) {
			myfile.close();
			return -1;
		}
		myfile.close();
	}

	return 1;
}

